<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<include file="Common:cssjs" />
</head>
<body>
<div class="subnav">
  <div class="content-menu ib-a blue line-x">
  <a href='javascript:;' class="on"><em>修改密码</em></a><span>|</span> 
  <a href='{:U("Adminmanage/myinfo")}' ><em>修改个人信息</em></a> 
  </div>
</div>
<style type="text/css">
	html{_overflow-y:scroll}
</style>
<script type="text/javascript">
  $(document).ready(function() {
	$.formValidator.initConfig({
		autotip:true,
		formid:"myform",
		onerror:function(msg){}});
	$("#password").formValidator({
		empty:true,
		onshow:"不修改密码请留空。",
		onfocus:"密码应该为6-20位之间",
		oncorrect:"旧密码输入正确"
		}).inputValidator({min:5,max:20,onerror:"密码应该为5-20位之间"}).ajaxValidator({
	    type : "get",
		url : "{:U('Admin/Adminmanage/verifypass')}",
		data :"",
		datatype : "json",
		async:'false',
		success : function(data){	
            if( data.status )
			{
                return true;
			}
            else
			{
                return false;
			}
		},
		buttons: $("#dosubmit"),
		onerror : "旧密码输入错误",
		onwait : "请稍候..."
	});
	$("#new_password").formValidator({onshow:"不修改密码请留空。",onfocus:"密码应该为6-20位之间"}).inputValidator({min:6,max:20,onerror:"密码应该为6-20位之间"});
	$("#new_pwdconfirm").formValidator({onshow:"不修改密码请留空。",onfocus:"请输入两次密码不同。",oncorrect:"密码输入一致"}).compareValidator({desid:"new_password",operateor:"=",onerror:"请输入两次密码不同。"});
  })
</script>
<div class="pad_10">
  <div class="common-form">
    <form name="myform" action="{:U('Admin/Adminmanage/chanpass')}" method="post" id="myform">
      </input>
      <table width="100%" class="table_form contentWrap">
        <tr>
          <td width="80">用户名</td>
          <td> {$User.username}</td>
        </tr>
        <tr>
          <td>E-mail</td>
          <td> {$User.email}</td>
        </tr>
        <tr>
          <td>旧密码</td>
          <td><input type="password" name="password" id="password" class="input-text">
            </input></td>
        </tr>
        <tr>
          <td>新密码</td>
          <td><input type="password" name="new_password" id="new_password" class="input-text">
            </input></td>
        </tr>
        <tr>
          <td>重复新密码</td>
          <td><input type="password" name="new_pwdconfirm" id="new_pwdconfirm" class="input-text">
            </input></td>
        </tr>
      </table>
      <div class="bk15"></div>
      <input name="dosubmit" type="submit" value="提交" class="button" id="dosubmit">
    </form>
  </div>
</div>
</body>
</html>